import request from '@/utils/request'
export function getCompanies(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetCompanies',
    method: 'get',
    params,
  })
}

export function addCompany(data) {
  return request({
    url: '/api/Platform/CompanyManage/AddCompany',
    method: 'post',
    data,
  })
}

export function editCompany(data) {
  return request({
    url: '/api/Platform/CompanyManage/EditCompany',
    method: 'post',
    data,
  })
}

export function deleteCompany(cmpId) {
  return request({
    url: '/api/Platform/CompanyManage/DeleteCompany',
    method: 'get',
    params: {
      cmpId
    },
  })
}

export function getEmployees(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetEmployees',
    method: 'get',
    params,
  })
}

export function getAllEmployees(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetAllEmployees',
    method: 'get',
    params,
  })
}

export function getCombineEmployees(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetCombineEmployees',
    method: 'get',
    params,
  })
}

export function addEmployee(data) {
  return request({
    url: '/api/Platform/CompanyManage/AddEmployee',
    method: 'post',
    data,
  })
}

export function editEmployee(data) {
  return request({
    url: '/api/Platform/CompanyManage/EditEmployee',
    method: 'post',
    data,
  })
}

export function deleteEmployee(empId) {
  return request({
    url: '/api/Platform/CompanyManage/DeleteEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}

export function combineEmployee(params) {
  return request({
    url: '/api/Platform/CompanyManage/CombineEmployee',
    method: 'get',
    params
  })
}

export function freezeEmployee(empId) {
  return request({
    url: '/api/Platform/CompanyManage/FreezeEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}

export function unfreezeEmployee(empId) {
  return request({
    url: '/api/Platform/CompanyManage/UnFreezeEmployee',
    method: 'get',
    params: {
      empId
    },
  })
}

export function getAuths() {
  return request({
    url: '/api/Platform/CompanyManage/GetAuths',
    method: 'get',
  })
}

export function getCompanyAuths(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetCompanyAuths',
    method: 'get',
    params,
  })
}

export function addCompanyAuth(data) {
  return request({
    url: '/api/Platform/CompanyManage/AddCompanyAuth',
    method: 'post',
    data,
  })
}

export function deleteCompanyAuth(authId) {
  return request({
    url: '/api/Platform/CompanyManage/DeleteCompanyAuth',
    method: 'get',
    params: {
      authId
    },
  })
}

export function combineCompany(params) {
  return request({
    url: '/api/Platform/CompanyManage/CombineCompany',
    method: 'get',
    params,
  })
}

export function getCompanyDepartments(params) {
  return request({
    url: '/api/Platform/CompanyManage/GetCompanyDepartments',
    method: 'get',
    params,
  })
}
